package org.codeCard.btn;

import com.tool.btn.MoBanBtn;
import com.tool.tcpimg.UIUtils;
import org.codeCard.panel.CodeCardBuyJPanel;
import org.codeCard.panel.CodeCardSaleJPanel;
import org.come.Jpanel.TeststateJpanel;

import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseEvent;

public class DianKaBuyBtn extends MoBanBtn {

    private static final long serialVersionUID = 7278895297657916980L;
    private CodeCardBuyJPanel buyXianYuJpanel;
    private CodeCardSaleJPanel sellerXianYuJpanel;
    private int BtnId;

    public DianKaBuyBtn(String iconpath, int type, Color[] colors, Font font, String text, CodeCardBuyJPanel buyXianYuJpanel) {
        super(iconpath, type, colors);
        this.setText(text);
        setFont(font);
        setVerticalTextPosition(SwingConstants.CENTER);
        setHorizontalTextPosition(SwingConstants.CENTER);
        this.buyXianYuJpanel = buyXianYuJpanel;
    }

    public DianKaBuyBtn(String iconpath, int type, Color[] colors, Font font, String text, CodeCardSaleJPanel sellerXianYuJpanel) {
        super(iconpath, type, colors);
        this.setText(text);//UIUtils.COLOR_BTNTEXT
        setFont(UIUtils.TEXT_FONT);
        setFont(font);
        setVerticalTextPosition(SwingConstants.CENTER);
        setHorizontalTextPosition(SwingConstants.CENTER);
        this.sellerXianYuJpanel = sellerXianYuJpanel;

    }

    public DianKaBuyBtn(String iconpath, int type, Color[] colors, int BtnId, String labelName,
                        CodeCardSaleJPanel sellerXianYuJpanel) {
        super(iconpath, type, colors);
        this.BtnId = BtnId;
        this.sellerXianYuJpanel = sellerXianYuJpanel;
        this.setText(labelName);
        if (BtnId == 0) {
            setFont(UIUtils.TEXT_FONT);
        } else {
            setFont(UIUtils.TEXT_HY88);
        }
        setVerticalTextPosition(SwingConstants.CENTER);
        setHorizontalTextPosition(SwingConstants.CENTER);
    }

    public DianKaBuyBtn(String iconpath, int type, Color[] colors, int BtnId, String labelName) {
        super(iconpath, type, colors);
        this.BtnId = BtnId;
        this.setText(labelName);
        if (BtnId == 0) {
            setFont(UIUtils.TEXT_FONT);
        } else {
            setFont(UIUtils.TEXT_HY88);
        }
        setVerticalTextPosition(SwingConstants.CENTER);
        setHorizontalTextPosition(SwingConstants.CENTER);
    }

    @Override
    public void chooseyes() {
        // TODO Auto-generated method stub

    }

    @Override
    public void chooseno() {
        // TODO Auto-generated method stub

    }

    @Override
    public void nochoose(MouseEvent e) {
        // TODO Auto-generated method stub
//        if (!Util.canBuyOrno) {
//            ZhuFrame.getZhuJpanel().addPrompt2("背包没有解锁!");
//            return;
//        }

    }


}
